<?php
$host = "localhost";
$db_user = "root";
$db_pass = "root";
$db_name = "demo";
$timezone = "Asia/Shanghai";


//$link=mysql_connect($host,$db_user,$db_pass);
//mysql_select_db($db_name,$link);
//mysql_query("SET names UTF8");

// 新的
$link = mysqli_connect($host, $db_user, $db_pass, $db_name);
mysqli_query($link, 'CREATE TEMPORARY TABLE `table`');

$GLOBALS['link'] = $link;
header("Content-Type: text/html; charset=utf-8");
date_default_timezone_set($timezone); //北京时间
?>
